<template>
  <div>
    <div>
      <el-button @click="colse">^—返回—^</el-button>
      <span style="margin-left: 470px;font-size: 30px">安全检查记录及整改</span>
      <el-divider content-position="right"></el-divider>
      <div style="width: 1300px">
        <span style="font-size:20px;color: red">基本信息</span>
        <el-form ref="form" label-width="200px" :model="SecurityCheckForm">
          <el-row>
            <el-col :span="12">
              <el-form-item label="日期:">
                <el-col :span="11">
                  <el-date-picker
                    type="date"
                    placeholder="选择日期"
                    style="width: 450px;"
                    value-format="yyyy-MM-dd"
                    v-model="SecurityCheckForm.updateDate"
                  ></el-date-picker>
                </el-col>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="安检编号:">
                <el-input v-model="SecurityCheckForm.id"></el-input>
              </el-form-item>
            </el-col>
          </el-row>
          <el-row>
            <el-col :span="12">
              <el-form-item label="项目名称:">
                <el-input v-model="SecurityCheckForm.projectName"></el-input>
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="检查人:">
                <el-input v-model="SecurityCheckForm.checker"></el-input>
              </el-form-item>
            </el-col>
          </el-row>

          <el-row>
            <el-form-item label="现场检查情况:">
              <el-input type="textarea" v-model="SecurityCheckForm.sceneCheckSituation"></el-input>
            </el-form-item>
          </el-row>
          <el-row>
            <el-form-item label="处理要求及措施:">
              <el-input type="textarea" v-model="SecurityCheckForm.handleMeasure"></el-input>
            </el-form-item>
          </el-row>
          <multi-file-upload
            style="font-size:20px;color: red"
            title="附件"
            action="http://localhost/uploads"
            :params="{folder: 'subTenderPlan'}"
            :headers="{token: token}"
            :show-button="false"
            :parent-file-list="fileList"
          ></multi-file-upload>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["getsecuritycheckid", "worklog", "securitychecks"], //接收父组件传递的数据
  data() {
    return {
      fileList: JSON.parse(JSON.stringify(this.securitychecks)),
      SecurityCheckForm: JSON.parse(JSON.stringify(this.getsecuritycheckid)), //避免子组件更新了父组件的数据状态
      worklo: JSON.parse(JSON.stringify(this.worklog))
    };
  },
  methods: {
    colse() {
      this.$emit("colse", (this.worklo = 1));
    }
  },
  created() {},
  computed: {
    token: {
      get() {
        return this.$store.state.token;
      }
    },
    checkRoute() {
      return Object.keys(this.$route.params).length != 0;
    }
  }
};
</script>

<style>
</style>